<?php
/* @var $this CustomerController */
/* @var $model Customer */
/* @var $form CActiveForm */
?>

<?php
setlocale(LC_ALL, "de_DE.UTF-8");

$criteria = new CDbCriteria;
$criteria->condition='customer_id=:customer_id';
$criteria->params=array(':customer_id'=>$model->customer_id);
$addresses = Address::model()->findAll($criteria);
?>

<?php $this->widget('zii.widgets.grid.CGridView', array(
    'cssFile' => Yii::app()->getRequest()->getBaseUrl() . '/css/tableStyle.css',
    'id'=>'address-grid',
    'dataProvider'=>$model,
    'columns'=>array(
        'type',
        'address',
        'postcode',
        'place',
        'country',
        array (
            'class'=>'CButtonColumn',
            'template'=>'{update}{delete}',
            'buttons'=>array(
                'update'=>array(
                    'imageUrl'=>Yii::app()->request->baseUrl.'/images/update.png',
                ),
                'delete'=>array(
                    'imageUrl'=>Yii::app()->request->baseUrl.'/images/delete.png',
                ),
            ),
        ),
    ),
)); ?>
